﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ctlSideSheduleFilterPanel.ascx.cs" Inherits="Ctl_ctlSideSheduleFilterPanel" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<%@ Register   Namespace="Grishko.UI"    TagPrefix="uc2" %>
<%@ Register assembly="UIControls" namespace="Grishko.UIControls" tagprefix="cc1" %>
<%@ Register src="ctlFilterEditor.ascx" tagname="ctlFilterEditor" tagprefix="uc1" %>

<%@ Register assembly="UIControls" namespace="UIControls" tagprefix="cc2" %>

<%@ Register src="ctlClientList_.ascx" tagname="ctlClientList_" tagprefix="uc2" %>

<asp:UpdatePanel ID="updFilter" UpdateMode="Conditional"  runat="server">
<ContentTemplate >
<table width ="100%" cellpadding ="0" cellspacing ="0" class ="TblCaption">
<tr >
    <td > 
        <table width="100%" cellpadding ="2" cellspacing ="0">
        <tr  >          
            <td style="width :20px" >           
                <asp:ImageButton ID="btnShowFilter" ImageUrl ="~/images/grd_plus.gif"  
                    runat="server" onclick="btnShowFilter_Click"  />                
            </td>                                                  
            <td style="width:350px">
                <uc2:FilterPanel ID="FilterPanel1" runat ="server" 
                AddImageUrl="~/images/add.png"  
                DeleteImageUrl="~/images/icon-delete.gif"
                EditImageUrl= "~/images/icon-edit.gif"  />
             </td>               
             <td style ="text-align :center"   >
                 <asp:ImageButton ID="btnNewContract" ImageUrl =<%# GetContractRecordImg() %> 
                     
                     ToolTip =<%# (String.IsNullOrEmpty(CurrentContractId)?"Сформировать контракт":"Остановить запись в контракт") %>  
                     runat="server" onclick="btnNewContract_Click" 
                     Height="16px" />
             </td>
             
             <td style ="text-align :center"   >
                 <asp:ImageButton ID="btnContractGo" ImageUrl ="~/images/goContract.png" 
                 Visible=<%# (!String.IsNullOrEmpty(CurrentContractId)) %>  
                 ToolTip ="Остановить запись. Перейти к контракту"
                 OnClick ="btnLoadContract_Click"
                 runat="server" 
                 Height="16px" 
                 style="width: 14px" />
             </td>
             <td style ="text-align :center "  class ="Split_Right"  >
                 &nbsp;</td>
              
             <td >
             <table style ="width :100%" cellpadding ="0" cellspacing ="0px" >
                    <tr >
                        <td style ="text-align :right " >
                            &nbsp                            
                        </td> 
                        <td style ="width :100px" >                              
                            <asp:DropDownList ID="cmbPeriodType" Width ="100px" CssClass ="TextBox" runat="server">
                            <asp:ListItem Value ="Month" > Месяц</asp:ListItem>
                            <asp:ListItem Value="Week"> Неделя</asp:ListItem>
                            <asp:ListItem Value="Day"> День</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        
                        <td style ="text-align :right;width:4px " >
                            &nbsp                            
                        </td> 
                        
                        <td style ="width :100px" >  
                            <cc2:TextBox_Date ID="txtStart" Text =<%# sDtStart %> runat="server" CssClass ="TextBox" ></cc2:TextBox_Date>          
                            <cc1:CalendarExtender Format="dd.MM.yyyy" ID="txtStart_CalendarExtender" runat="server" 
                                Enabled="True" TargetControlID="txtStart">
                            </cc1:CalendarExtender>                  
                        </td>
                        <td style ="text-align :right;width:10px " >
                            &nbsp                            
                        </td> 
                        <td style ="width :100px" >  
                            <cc2:TextBox_Date ID="txtFinish" Text =<%# sDtFinish %> runat="server" Width ="95px" CssClass ="TextBox" ></cc2:TextBox_Date>                                            
                            <cc1:CalendarExtender Format="dd.MM.yyyy" ID="txtFinish_CalendarExtender" runat="server" 
                                Enabled="True" TargetControlID="txtFinish">
                            </cc1:CalendarExtender>                  
                        </td>
                        <td style ="width:5px"  >                        
                        &nbsp
                        </td> 
                        <td style ="width:20px"  >                        
                            <asp:ImageButton ID="btnFind"  ImageUrl ="~/images/search_button.gif" 
                                runat="server" onclick="btnFind_Click" 
                                style="height: 12px; "  />
                        </td>
                        <td style ="text-align :right ; width:4px"  >
                            &nbsp                            
                        </td> 
                        
                    </tr>
                </table>
             </td>
            <td  >
                
            </td>
        </tr>
        
        </table>
    </td>
</tr>
 


</table>
     
   
 <asp:Panel ID="pnlEditFilter"  CssClass ="EditRowBackGround"  Width ="100%" runat="server">
         <uc1:ctlFilterEditor ID="ctlFilterEditor1" runat="server" />
    </asp:Panel>  



   
<asp:Panel ID="pnlNewContract" runat="server"  BackColor ="White" Width   ="600px" Height ="200px" CssClass ="TextBox">
    <table style="width:100%;" cellpadding ="3" cellspacing ="0">
    <tr>
        <td  style ="font-weight :bold " class ="grd_td_head"    >
            Создать контракт</td>
        <td style ="width :20px ; text-align :right " class ="grd_td_head"  >
            <asp:ImageButton ID="btnClose" runat="server"  ImageUrl="~/images/close.gif" Width="16px" />
        </td>
    </tr>       
    </table>    
  
 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate >                                
    <table style="width: 100%;background-color:White  ";>
            <tr >
            <td width="25%" >
                &nbsp;</td>
            <td style="width:25%" class ="grd_td_item_caption" >
                Номер:                                
                </td>
            <td  class ="grd_td_item" >
                <asp:TextBox ID="txtContractNumber" runat="server" 
                    CssClass="RequiredTextBox"  Width="99%"></asp:TextBox>
            </td>
            </tr>            
            <tr >
            <td width="25%" style="height: 25px" >
                </td>
            <td style="width:25%; height: 25px;" class ="grd_td_item_caption" >
                Тип:                                
                </td>
            <td  class ="grd_td_item" style="height: 25px" >
                <asp:DropDownList ID="cmbContractState" DataSource =<%# ContractTypeSouce %>  
                    runat="server" CssClass="TextBox" 
                    Width="99%" DataTextField="Text" DataValueField="Value">
                </asp:DropDownList>
            </td>
            </tr>            
            <tr >
            <td width="25%" >
                &nbsp;</td>
            <td style="width:25%" class ="grd_td_item_caption" >
                Дата:                                
                </td>
            <td  class ="grd_td_item" >
                <asp:TextBox ID="txtStateDate" runat="server" 
                    CssClass="TextBox"  Width="100px"></asp:TextBox>
                    <cc1:CalendarExtender Format="dd.MM.yyyy" ID="CalendarExtender1" runat="server" 
                                Enabled="True" TargetControlID="txtStateDate">
                            </cc1:CalendarExtender>                  
            </td>
            </tr>            
            <tr>
                <td width="25%">
                    &nbsp;</td>
                <td class="grd_td_item_caption" style="width:25%">
                    Клиент:</td>
                <td class="grd_td_item">
                  <asp:UpdatePanel ID="UpdatePanel2" UpdateMode = "Conditional" runat   ="server"  >
                    <ContentTemplate >            
                    <uc2:ctlClientList_ ID="ctlClientList_1" runat="server" />  
                    </ContentTemplate> 
            </asp:UpdatePanel> 
                    
                </td>
            </tr>
            <tr >
            <td width="25%" colspan="3" style ="text-align :right; vertical-align :middle " >            
                <asp:Label ID="lblMessage" Visible =False  runat="server" Text="Label" 
                    ForeColor="#FF3300"></asp:Label>
                &nbsp;                
                <asp:Button ID="Button3" runat="server" CssClass="btn_wizard" 
                    onclick="btnCreateNewContract_Click" Text="Сохранить" />
                </td>
            </tr>
        </table>
     </ContentTemplate>
</asp:UpdatePanel>      
 </asp:Panel>   

<cc1:ModalPopupExtender ID="PopPanel_Contract" runat="server"
                                    TargetControlID="proxyButton"
                                    PopupControlID="pnlNewContract"
                                    BackgroundCssClass="PopupWindowBackGround" 
                                    
                                    DropShadow="False" 
                                    OkControlID="btnClose"     
                                    CancelControlID="btnClose" 
                                    PopupDragHandleControlID="pnlNewClient">
                                    </cc1:ModalPopupExtender>    
<asp:LinkButton ID="proxyButton" runat="server"></asp:LinkButton>
<asp:HiddenField ID="hfCurrentContractID" runat="server" />

</ContentTemplate>
</asp:UpdatePanel> 

 
 

 